function isNumber(v) {
	return typeof v === 'number' && isFinite(v);
}

function formatMoney(s, n) {
	n = n >= 0 && n <= 20 ? n : 2;
	s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(n) + "";
	var l = s.split(".")[0].split("").reverse(), r = s.split(".")[1];
	t = "";
	for (i = 0; i < l.length; i++) {
		t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
	}
	if(r==undefined){
		return t.split("").reverse().join("");
	}else{
		return t.split("").reverse().join("") + "." + r;
	}
}
/**
 * 转换成比例格式，0.23转换成23%
 * @param v
 * @param decimal 小数点后几位，默认为0
 */
function formatRate(v,decimal){
	if(!v){
		return v;
	}
	if(decimal){
		return (v*100).toFixed(decimal)+"%";
	}else{
		return (v*100).toFixed(2)+"%";
	}
}
(function($){
	$.fn.middle = function(){
		return this.each(function(i){
			var h = $(this).height();
			var oh = $(this).outerHeight();
			var mt = (h + (oh -h))/2;
			$(this).css("margin-top","-"+mt+"px");
			$(this).css("top","50%");
			$(this).css("position","absolute");
		});
	};
	$.fn.center = function(){
		return this.each(function(i){
			var w = $(this).width();
			var ow = $(this).outerWidth();
			var ml = (w+(ow-w))/2;
			$(this).css("margin-left","-"+ml+"px");
			$(this).css("left","50%");
			$(this).css("position","absolute");
		});
	};
})(jQuery);
function fillZero(v){
	if(v==null || v==''){
		return 0;
	}
	return v;
}
Highcharts.setOptions({
	chart:{
		borderWidth:0,
		backgroundColor:"#F2F2F2"
	}
});